Skip to content

Commit cc55921

Browse files
committed
cmake - fix regression with policy not taking effect after 3971408
1 parent a3fda66 commit cc55921

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

cmake/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,10 @@ else()
3535
set(RELEASE_VERSION "0.8.0")
3636
endif()
3737

38-
project(IfcOpenShell VERSION ${RELEASE_VERSION})
39-
4038
add_definitions(-D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)
4139

4240
if(POLICY CMP0141) # 3.25+
41+
# Has to be set before `project` to take effect.
4342
cmake_policy(SET CMP0141 NEW) # Support for `CMAKE_MSVC_DEBUG_INFORMATION_FORMAT`.
4443
endif()
4544
if(POLICY CMP0144) # 3.27
@@ -49,6 +48,8 @@ if(POLICY CMP0167) # 3.30
4948
cmake_policy(SET CMP0167 OLD)
5049
endif()
5150

51+
project(IfcOpenShell VERSION ${RELEASE_VERSION})
52+
5253
if(NOT CMAKE_BUILD_TYPE)
5354
set(CMAKE_BUILD_TYPE "Release")
5455
endif()

0 commit comments

Comments
 (0)