Skip to content

Commit

Permalink
Set correct C++ version for libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisThielemans committed Feb 1, 2024
1 parent c5e3e7a commit 9cc0d1f
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/cmake/stir_lib_target.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,8 @@ target_include_directories(${dir} PUBLIC
$<BUILD_INTERFACE:${STIR_INCLUDE_DIR}>
$<INSTALL_INTERFACE:${STIR_INCLUDE_INSTALL_DIR}>)

# make sure that if you use STIR, the compiler will be set to at least C++11
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.8.0")
target_compile_features(${dir} PUBLIC cxx_std_11)
else()
# Older CMake didn't have cxx_std_11 yet, but using auto will presumably force it anyway
target_compile_features(${dir} PUBLIC cxx_auto_type)
endif()
# make sure that if you use STIR, the compiler will be set to what was set via UseCXX
target_compile_features(${dir} PUBLIC cxx_std_${CMAKE_CXX_STANDARD})
target_include_directories(${dir} PUBLIC ${Boost_INCLUDE_DIR})

SET_PROPERTY(TARGET ${dir} PROPERTY FOLDER "Libs")
Expand Down

0 comments on commit 9cc0d1f

Please sign in to comment.