Skip to content

Commit

Permalink
set float option just after main default options
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiangyu-Hu committed Aug 1, 2024
1 parent 8b883cb commit cd68b1a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# target_compile_options(sphinxsys_core INTERFACE $<$<BOOL:${SPHINXSYS_DEVELOPER_MODE}>:-Wpedantic>) # For strict C++ standard compliance # TODO:
endif()

if(SPHINXSYS_USE_SYCL)
if(NOT SPHINXSYS_USE_FLOAT)
set(SPHINXSYS_USE_FLOAT ON)
message("-- Float is used as required by SPHinXsysSYCL.")
endif()
endif()

target_compile_definitions(sphinxsys_core INTERFACE SPHINXSYS_USE_SYCL=$<BOOL:${SPHINXSYS_USE_SYCL}>)
target_compile_definitions(sphinxsys_core INTERFACE SPHINXSYS_USE_FLOAT=$<BOOL:${SPHINXSYS_USE_FLOAT}>)

Expand Down Expand Up @@ -106,11 +113,6 @@ if(SPHINXSYS_USE_SYCL)
message(FATAL_ERROR "-- SPHinXsysSYCL is only supported with IntelLLVM compiler.")
endif()

if(NOT SPHINXSYS_USE_FLOAT)
set(SPHINXSYS_USE_FLOAT ON)
message("-- Float is used as required by SPHinXsysSYCL.")
endif()

if(NOT SPHINXSYS_SYCL_TARGETS)
set(SPHINXSYS_SYCL_TARGETS spir64_x86_64)
endif()
Expand Down

0 comments on commit cd68b1a

Please sign in to comment.