Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shorten some excessively long lines of CMake #44

Merged
merged 1 commit into from
Feb 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,13 @@ if(NOT foonathan_memory_FOUND)
include(ExternalProject)

if(INSTALLER_PLATFORM)
set(PATCH_COMMAND_STR PATCH_COMMAND git apply ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt.patch && sed -i -e "s/INSTALLER_PLATFORM/${INSTALLER_PLATFORM}/g" CMakeLists.txt)
set(PATCH_COMMAND_STR PATCH_COMMAND
git apply ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt.patch &&
sed -i -e "s/INSTALLER_PLATFORM/${INSTALLER_PLATFORM}/g" CMakeLists.txt)
elseif(BUILD_MEMORY_TESTS)
# This could be removed whenever we change the GIT_TAG from c619113 to anything above 09b884c
set(PATCH_COMMAND_STR PATCH_COMMAND curl https://github.com/foonathan/memory/commit/09b884c18abb314bfa678df27141a4dcad71c4ba.diff | git apply -)
set(PATCH_COMMAND_STR PATCH_COMMAND
curl https://github.com/foonathan/memory/commit/09b884c18abb314bfa678df27141a4dcad71c4ba.diff | git apply -)
endif()

externalproject_add(foo_mem-ext
Expand Down
12 changes: 8 additions & 4 deletions foonathan_memory-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,19 @@

if(MSVC_VERSION EQUAL 1900)
if(CMAKE_CL_64)
include("${CMAKE_CURRENT_LIST_DIR}/../share/foonathan_memory-x64Win64VS2015/cmake/foonathan_memory-config.cmake")
include(
"${CMAKE_CURRENT_LIST_DIR}/../share/foonathan_memory-x64Win64VS2015/cmake/foonathan_memory-config.cmake")
else()
include("${CMAKE_CURRENT_LIST_DIR}/../share/foonathan_memory-i86Win32VS2015/cmake/foonathan_memory-config.cmake")
include(
"${CMAKE_CURRENT_LIST_DIR}/../share/foonathan_memory-i86Win32VS2015/cmake/foonathan_memory-config.cmake")
endif()
elseif(MSVC_VERSION GREATER 1900)
if(CMAKE_CL_64)
include("${CMAKE_CURRENT_LIST_DIR}/../share/foonathan_memory-x64Win64VS2017/cmake/foonathan_memory-config.cmake")
include(
"${CMAKE_CURRENT_LIST_DIR}/../share/foonathan_memory-x64Win64VS2017/cmake/foonathan_memory-config.cmake")
else()
include("${CMAKE_CURRENT_LIST_DIR}/../share/foonathan_memory-i86Win32VS2017/cmake/foonathan_memory-config.cmake")
include(
"${CMAKE_CURRENT_LIST_DIR}/../share/foonathan_memory-i86Win32VS2017/cmake/foonathan_memory-config.cmake")
endif()
else()
message(FATAL_ERROR "Not supported version of Visual Studio")
Expand Down