Skip to content

Commit e004a38

Browse files
authored
Merge pull request #2338 from RossBrunton/ross/optorder
Set cmake options before including helpers
2 parents 76b5df4 + 166bfe0 commit e004a38

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

CMakeLists.txt

+13-13
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,6 @@ include(CheckCXXSourceCompiles)
1616
include(CMakePackageConfigHelpers)
1717
include(CTest)
1818

19-
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
20-
include(helpers)
21-
22-
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
23-
set(Python3_FIND_FRAMEWORK NEVER)
24-
set(Python3_FIND_STRATEGY LOCATION)
25-
endif()
26-
27-
find_package(Python3 COMPONENTS Interpreter REQUIRED)
28-
29-
set(CMAKE_CXX_STANDARD 17)
30-
set(CMAKE_CXX_STANDARD_REQUIRED YES)
31-
3219
# Build Options
3320
option(UR_BUILD_EXAMPLES "Build example applications." ON)
3421
option(UR_BUILD_TESTS "Build unit tests." ON)
@@ -81,6 +68,19 @@ set(UR_ADAPTER_HIP_SOURCE_DIR "" CACHE PATH
8168
set(UR_ADAPTER_NATIVE_CPU_SOURCE_DIR "" CACHE PATH
8269
"Path to external 'native_cpu' adapter source dir")
8370

71+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
72+
include(helpers)
73+
74+
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
75+
set(Python3_FIND_FRAMEWORK NEVER)
76+
set(Python3_FIND_STRATEGY LOCATION)
77+
endif()
78+
79+
find_package(Python3 COMPONENTS Interpreter REQUIRED)
80+
81+
set(CMAKE_CXX_STANDARD 17)
82+
set(CMAKE_CXX_STANDARD_REQUIRED YES)
83+
8484
# There's little reason not to generate the compile_commands.json
8585
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
8686

0 commit comments

Comments
 (0)