Skip to content

Commit

Permalink
Toolchain should be set before project directive
Browse files Browse the repository at this point in the history
  • Loading branch information
JayKickliter committed Mar 8, 2021
1 parent 663ff1e commit c73354c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions c_src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
# Project Setup #
##########################################################################
cmake_minimum_required(VERSION 3.11)

if(DEFINED ENV{CMAKE_TOOLCHAIN_FILE})
set(CMAKE_TOOLCHAIN_FILE $ENV{CMAKE_TOOLCHAIN_FILE})
endif()

project(ErlangErasure C)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_C_STANDARD 99)

list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake)
include(ASan)

if(DEFINED ENV{CMAKE_TOOLCHAIN_FILE})
set(CMAKE_TOOLCHAIN_FILE $ENV{CMAKE_TOOLCHAIN_FILE})
endif()

IF (APPLE)
set(CMAKE_MODULE_LINKER_FLAGS "-flat_namespace -undefined suppress")
set(CMAKE_MACOSX_RPATH 1)
Expand Down

0 comments on commit c73354c

Please sign in to comment.