Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build overhaul2 #359

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ build_*/
# dependencies
thirdparty/*
!thirdparty/llvm-project/
!thirdparty/patches/

# Visual Studio Code
.vscode/
Expand Down
27 changes: 25 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,31 @@ set(LLVM_ENABLE_RTTI ON)
SET(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

include_directories(${OPENBLAS_INST_DIR}/include)
SET(OPENBLAS_LIBRARIES ${OPENBLAS_INST_DIR}/lib/libopenblas.a ${CMAKE_THREAD_LIBS_INIT})
set(BLA_VENDOR OpenBLAS)
set(BLA_STATIC ON)
find_package(BLAS)

# specify multiple paths in CMAKE_PREFIX_PATH separated by semicolon to add multiple include dirs
# to make compile/exec in container plus finding includes in local IDE work, specify both, local third party sources
# prefix and /usr/local e.g.: -DCMAKE_PREFIX_PATH="/usr/local;${PROJECT_SOURCE_DIR}/thirdparty/installed"

message(STATUS "ANTLR_VERSION: ${ANTLR_VERSION}")
foreach(path ${CMAKE_PREFIX_PATH})
message(STATUS "CMAKE_PREFIX_PATH: ${path}")
include_directories(${path}/include)
include_directories(${path}/include/openblas)
file(GLOB ANTLR_JAR_FOUND ${path}/share/antlr4/antlr-${ANTLR_VERSION}-complete.jar)
if(DEFINED ANTLR_JAR_FOUND)
message(STATUS "ANTLR_JAR_FOUND: ${ANTLR_JAR_FOUND}")
set(ANTLR4_JAR_LOCATION ${ANTLR_JAR_FOUND} CACHE STRING "default value for ANTLR jar file")
endif()
endforeach(path)

# fallback if not using CMAKE_PREFIX_PATH (e.g., system/container install)
if(NOT DEFINED CMAKE_PREFIX_PATH)
set(ANTLR4_JAR_LOCATION /usr/local/share/antlr4/antlr-${ANTLR_VERSION}-complete.jar CACHE STRING "default value for ANTLR jar file")
include_directories(/usr/local/include/openblas)
endif()

# check <package>_ROOT env var
cmake_policy(SET CMP0074 NEW)
Expand Down
Loading