Skip to content

Commit a06ddd7

Browse files
massonalfpistm
authored andcommitted
fix: add enable_language() calls at library level
ASM not being enabled when `external_library()` is called triggered an error where CMAKE_ASM_COMPILE_OBJECT was undefined. This commit fixes that by adding the calls to enable_language() earlier in the config process.
1 parent 2d5d817 commit a06ddd7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: cmake/external_library.cmake

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
cmake_minimum_required(VERSION 3.21)
22

3+
# note: the doc say these must be called _at file scope_, not in a function
4+
enable_language(C)
5+
enable_language(CXX)
6+
enable_language(ASM)
7+
38
function(external_library)
49
cmake_parse_arguments(PARSE_ARGV 0 XLIB "FORCE" "PATH" "DEPENDS")
510

0 commit comments

Comments
 (0)