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

cmake/external_library.cmake

Lines changed: 5 additions & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy