summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBaruch Sterin <baruchs@gmail.com>2022-01-23 00:16:10 +0100
committerBaruch Sterin <baruchs@gmail.com>2022-01-23 00:23:52 +0100
commit0a536417f6be75fcf26720767a61bd1f57a685b5 (patch)
tree30082be55cdf1072d3a7e02017aa947df3ab72cb /CMakeLists.txt
parent2ccb0f783495a65cc597865ba24556cc64b8eaa1 (diff)
downloadabc-0a536417f6be75fcf26720767a61bd1f57a685b5.tar.gz
abc-0a536417f6be75fcf26720767a61bd1f57a685b5.tar.bz2
abc-0a536417f6be75fcf26720767a61bd1f57a685b5.zip
Build CMake on GitHub Actions
Also, resolve CMake build problems on macOS: Pass CMAKE_OSX_SYSROOT as an environment variable SDKROOT when buildind the arch_flags executable.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7cf6f19a..cee9bc72 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,9 +47,14 @@ if(ABC_USE_NAMESPACE)
set(ABC_USE_NAMESPACE_FLAGS "ABC_USE_NAMESPACE=${ABC_USE_NAMESPACE}")
endif()
+if( APPLE )
+ set(make_env ${CMAKE_COMMAND} -E env SDKROOT=${CMAKE_OSX_SYSROOT})
+endif()
+
# run make to extract compiler options, linker options and list of source files
execute_process(
COMMAND
+ ${make_env}
make
${ABC_READLINE_FLAGS}
${ABC_USE_NAMESPACE_FLAGS}