Skip to content

Commit a15832b

Browse files
committed
fix(MSVC): force release runtime library
1 parent 4fd1407 commit a15832b

File tree

7 files changed

+9
-3
lines changed

7 files changed

+9
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1919
# SOFTWARE.
2020

21-
cmake_minimum_required(VERSION 3.14)
21+
cmake_minimum_required(VERSION 3.15)
2222

2323
#-------------------------------------------------------------------------------
2424
# Project options

cmake/ConfigureAbseil.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ ExternalProject_Add(abseil
3232
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
3333
-DCMAKE_INSTALL_MESSAGE=LAZY
3434
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
35+
-DCMAKE_MSVC_RUNTIME_LIBRARY:STRING=${CMAKE_MSVC_RUNTIME_LIBRARY}
3536
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
3637
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
3738
-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}

cmake/ConfigureAsync++.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ ExternalProject_Add(asyncplusplus
3232
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
3333
-DCMAKE_INSTALL_MESSAGE=LAZY
3434
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
35+
-DCMAKE_MSVC_RUNTIME_LIBRARY:STRING=${CMAKE_MSVC_RUNTIME_LIBRARY}
3536
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
3637
-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}
3738
CMAKE_CACHE_ARGS

cmake/SuperBuild.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ endif()
3434
if("${CMAKE_CXX_STANDARD}" STREQUAL "")
3535
set(CMAKE_CXX_STANDARD 11)
3636
endif()
37+
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<BOOL:${BUILD_SHARED_LIBS}>:DLL>")
3738

3839
# Begin configuration of the superbuild project
3940
project(SuperBuild NONE)

cmake/utils.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14)
1+
cmake_minimum_required(VERSION 3.15)
22

33
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
44
message(STATUS "Setting build type to 'Release' as none was specified.")
@@ -55,6 +55,7 @@ if(NOT BUILD_SHARED_LIBS)
5555
$<$<CXX_COMPILER_ID:MSVC>:/INCREMENTAL:NO>
5656
)
5757
endif()
58+
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<BOOL:${BUILD_SHARED_LIBS}>:DLL>")
5859

5960
#------------------------------------------------------------------------------------------------
6061
# Install configuration

tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1919
# SOFTWARE.
2020

21-
cmake_minimum_required(VERSION 3.14)
21+
cmake_minimum_required(VERSION 3.15)
2222

2323
if(NOT TARGET OpenGeode::basic)
2424
project(OpenGeode CXX)

upgrade-guide.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ To allow this feature, each library needs to be explicitly initialized at the be
1010

1111
### Breaking Changes
1212

13+
-**CMake**: Minimum required version bump to 3.15
14+
1315
- **Library**: Each library/OpenGeode module needs to use the new macro pairs `OPENGEODE_LIBRARY`/`OPENGEODE_LIBRARY_IMPLEMENTATION` defined in the basic/library.h header file. They replace the macro `OPENGEODE_LIBRARY_INITIALIZE`. Examples can be found in the common.h and common.cpp of each OpenGeode library.
1416

1517
- **Mapping**: Header file `<geode/model/representation/builder/copy_mapping.h>` no longer exists, use `<geode/model/representation/core/mapping.h>` instead. Moreover, the class `ModelCopyMapping` cannot be forward declared anymore. Add the corresponding include in your files.

0 commit comments

Comments
 (0)