Skip to content

Commit

Permalink
add macro to fix bug with boost
Browse files Browse the repository at this point in the history
  • Loading branch information
fredboudon committed Jan 24, 2024
1 parent 5130788 commit 0043d28
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ endif("${isSystemDir}" STREQUAL "-1")

# --- CXX11 Compilation

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
Expand All @@ -44,6 +44,9 @@ init_py_config("${CMAKE_CURRENT_SOURCE_DIR}/src/openalea/plantgl/config.py")
if (MSVC)
string(REGEX REPLACE "/W3" "/W0" ${CMAKE_CXX_FLAGS} "${${CMAKE_CXX_FLAGS}}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MD")

# To fix compilation error with vc14 and boost
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DHAVE_SNPRINTF")
endif()


Expand Down

0 comments on commit 0043d28

Please sign in to comment.