Skip to content

Commit

Permalink
move cmake cxx standard definition up in hierarchy
Browse files Browse the repository at this point in the history
  • Loading branch information
marenz2569 committed Nov 25, 2024
1 parent 0539cb4 commit 53d5975
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ project(FIRESTARTER)
enable_testing()

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_STANDARD 17)

include(cmake/GitSubmoduleUpdate.cmake)

Expand Down
9 changes: 0 additions & 9 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ add_library(firestartercore STATIC
firestarter/Environment/X86/Payload/SSE2Payload.cpp
)

target_compile_features(firestartercore PRIVATE cxx_std_17)

target_link_libraries(firestartercore
hwloc
AsmJit::AsmJit
Expand All @@ -59,8 +57,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
firestarter/Optimizer/Algorithm/NSGA2.cpp
)

target_compile_features(firestarterlinux PRIVATE cxx_std_17)

target_link_libraries(firestarterlinux
Nitro::log
nlohmann_json::nlohmann_json
Expand All @@ -86,7 +82,6 @@ if ("${FIRESTARTER_BUILD_TYPE}" STREQUAL "FIRESTARTER_CUDA")
${FIRESTARTER_FILES}
firestarter/Cuda/Cuda.cpp
)
target_compile_features(FIRESTARTER_CUDA PRIVATE cxx_std_17)

target_link_libraries(FIRESTARTER_CUDA
firestartercore
Expand Down Expand Up @@ -134,7 +129,6 @@ elseif ("${FIRESTARTER_BUILD_TYPE}" STREQUAL "FIRESTARTER_ONEAPI")
${FIRESTARTER_FILES}
firestarter/OneAPI/OneAPI.cpp
)
target_compile_features(FIRESTARTER_ONEAPI PRIVATE cxx_std_17)

target_link_libraries(FIRESTARTER_ONEAPI
firestartercore
Expand Down Expand Up @@ -171,13 +165,11 @@ elseif("${FIRESTARTER_BUILD_TYPE}" STREQUAL "FIRESTARTER_HIP")

set(CMAKE_CXX_COMPILER ${HIP_HIPCC_EXECUTABLE})
set(CMAKE_CXX_LINKER ${HIP_HIPCC_EXECUTABLE})
set( CMAKE_CXX_STANDARD 17 )

add_executable(FIRESTARTER_HIP
${FIRESTARTER_FILES}
firestarter/Cuda/Cuda.cpp
)
target_compile_features(FIRESTARTER_HIP PRIVATE cxx_std_17)

target_link_libraries(FIRESTARTER_HIP
firestartercore
Expand Down Expand Up @@ -206,7 +198,6 @@ elseif(${FIRESTARTER_BUILD_TYPE} STREQUAL "FIRESTARTER")
add_executable(FIRESTARTER
${FIRESTARTER_FILES}
)
target_compile_features(FIRESTARTER PRIVATE cxx_std_17)

target_link_libraries(FIRESTARTER
firestartercore
Expand Down

0 comments on commit 53d5975

Please sign in to comment.