diff --git a/CMakeLists.txt b/CMakeLists.txt index f34e349..90c6b3c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,12 @@ cmake_minimum_required(VERSION 3.1...3.22) # Initialize the project. -project(mentos C ASM) +project(mentos) + +enable_language(C) +enable_language(ASM) + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdlib") # ============================================================================= # BUILD TYPE (Debug/Release) @@ -61,13 +66,6 @@ else() # set(CMAKE_LINKER ld) endif() -if(NOT DEFINED HAVE_FLAG_SEARCH_PATHS_FIRST) - set(HAVE_FLAG_SEARCH_PATHS_FIRST 0) - if("${DARWIN_MAJOR_VERSION}" GREATER 6) - set(HAVE_FLAG_SEARCH_PATHS_FIRST 1) - endif() -endif() - # ============================================================================= # COMPILATION # ============================================================================= diff --git a/mentos/CMakeLists.txt b/mentos/CMakeLists.txt index 2d014ea..bcf3be4 100644 --- a/mentos/CMakeLists.txt +++ b/mentos/CMakeLists.txt @@ -6,7 +6,10 @@ cmake_minimum_required(VERSION 3.1...3.22) # Initialize the project. -project(kernel C ASM) +project(kernel) + +enable_language(C) +enable_language(ASM) # ============================================================================= # Set the main file names. diff --git a/programs/CMakeLists.txt b/programs/CMakeLists.txt index 384c03c..a997faa 100644 --- a/programs/CMakeLists.txt +++ b/programs/CMakeLists.txt @@ -6,7 +6,9 @@ cmake_minimum_required(VERSION 3.1...3.22) # Initialize the project. -project(programs C) +project(programs) + +enable_language(C) # ============================================================================= # List of programs. diff --git a/programs/tests/CMakeLists.txt b/programs/tests/CMakeLists.txt index 9cd4dc0..3632a3a 100644 --- a/programs/tests/CMakeLists.txt +++ b/programs/tests/CMakeLists.txt @@ -6,7 +6,9 @@ cmake_minimum_required(VERSION 3.1...3.22) # Initialize the project. -project(tests C) +project(tests) + +enable_language(C) # ============================================================================= # List of programs.