Skip to content

Commit 499530f

Browse files
committed
1. Added (copies) of lib and lib32 folders for OMP and pthreads
libraries. These are copies of what dev branch of iqtree2 has (these are needed for Windows builds) 2. Decided, it's better if iqtree_config.h gets generated after all. 3. decenttree_update.sh copies lib and lib32 folder contents too. 4. A bunch of visual studio file extensions and "magic folders" are now excluded from source control.
1 parent da87380 commit 499530f

15 files changed

+56
-48
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
11
build/
2+
*.suo
3+
*.ipch
4+
/.vs
5+
/x64/Debug
6+
/x64/Release
7+
/decentTree.vcxproj.user

CMakeLists.txt

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#########################################################################
2-
# DecentTree cmake build definition
2+
# decenttree cmake build definition
33
# Copyright (c) 2012-2020 Bui Quang Minh, Lam-Tung Nguyen, James Barbetti
44
#########################################################################
55

6-
cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR)
7-
project(decentTree)
6+
cmake_minimum_required(VERSION 3.18.0 FATAL_ERROR)
7+
project(decenttree)
88

99
# Windows example usages:
1010
#------------------------
@@ -46,7 +46,6 @@ project(decentTree)
4646
# assuming you installed LLVM via Homebrew: brew install --with-toolchain llvm
4747
# cmake -G XCode -DCMAKE_XCODE_ATTRIBUTE_CC=/usr/local/opt/llvm/bin/clang -DCMAKE_XCODE_ATTRIBUTE_CXX=/usr/local/opt/llvm/bin/clang++ <source_dir>
4848
#
49-
#
5049
# Compile OpenMP version: cmake ....
5150
# Compile 32-bit version: cmake -DDECENTTREE_FLAGS=m32 ....
5251
# Compile static version: cmake -DDECENTTREE_FLAGS=static ....
@@ -60,12 +59,11 @@ project(decentTree)
6059

6160
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
6261
set(GCC_MIN_VERSION "4.8")
63-
add_definitions(-DDECENT_TREE)
6462

6563
# The version number.
66-
set (decentTree_VERSION_MAJOR 1)
67-
set (decentTree_VERSION_MINOR 0)
68-
set (decentTree_VERSION_PATCH ".0")
64+
set (decenttree_VERSION_MAJOR 1)
65+
set (decenttree_VERSION_MINOR 0)
66+
set (decenttree_VERSION_PATCH ".0")
6967

7068
if (CMAKE_C_COMPILER MATCHES "mpic")
7169
set(DECENTTREE_FLAGS "${DECENTTREE_FLAGS} mpi")
@@ -493,27 +491,6 @@ if (DECENTTREE_FLAGS MATCHES "libcxx")
493491
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
494492
endif()
495493

496-
message("CMake build type: ${CMAKE_BUILD_TYPE}")
497-
498-
if (CMAKE_BUILD_TYPE STREQUAL "Release")
499-
message("C flags : ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}")
500-
message("CXX flags : ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}")
501-
elseif (CMAKE_BUILD_TYPE STREQUAL "Debug")
502-
message("C flags : ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_DEBUG}")
503-
message("CXX flags : ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}")
504-
elseif (CMAKE_BUILD_TYPE STREQUAL "Profile")
505-
message("C flags : ${CMAKE_C_FLAGS_PROFILE} ")
506-
message("CXX flags : ${CMAKE_CXX_FLAGS_PROFILE} ")
507-
else()
508-
message("C flags : ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}")
509-
message("CXX flags : ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}")
510-
endif()
511-
512-
message("LINKER flags : ${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
513-
get_directory_property( COMPILER_DEFINITIONS DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS )
514-
message("Compiler defns : ${COMPILER_DEFINITIONS}")
515-
516-
517494
if (GCC)
518495
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -fno-inline-functions -fno-inline-functions-called-once -fno-default-inline -fno-inline")
519496
set(CMAKE_C_FLAGS_DEBUG "-O0 -g -fno-inline-functions -fno-inline-functions-called-once -fno-default-inline -fno-inline")
@@ -545,12 +522,15 @@ configure_file (
545522
"${PROJECT_BINARY_DIR}/decenttree_config.h"
546523
)
547524

525+
configure_file (
526+
"${PROJECT_SOURCE_DIR}/iqtree_config.h.in"
527+
"${PROJECT_BINARY_DIR}/iqtree_config.h"
528+
)
529+
548530
# add the binary tree to the search path for include files
549531
# so that we will find decenttree_config.h
550532
include_directories("${PROJECT_BINARY_DIR}")
551533

552-
#zlib will be detected for appearance
553-
#include_directories("${PROJECT_BINARY_DIR}/zlib-1.2.7")
554534

555535
if (NOT DECENTTREE_FLAGS MATCHES "nozlib")
556536
find_package(ZLIB)
@@ -572,11 +552,36 @@ endif(ZLIB_FOUND)
572552
add_subdirectory(vectorclass)
573553
LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")
574554

555+
add_compile_definitions(USE_PROGRESS_DISPLAY=1)
556+
add_compile_definitions(USE_VECTORCLASS_LIBRARY=1)
557+
add_compile_definitions(USE_GZSTREAM=1)
558+
add_compile_definitions(DECENT_TREE=1)
559+
560+
message("CMake build type: ${CMAKE_BUILD_TYPE}")
561+
message("CMake source dir: ${CMAKE_SOURCE_DIR}")
562+
if (CMAKE_BUILD_TYPE STREQUAL "Release")
563+
message("C flags : ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}")
564+
message("CXX flags : ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}")
565+
elseif (CMAKE_BUILD_TYPE STREQUAL "Debug")
566+
message("C flags : ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_DEBUG}")
567+
message("CXX flags : ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}")
568+
elseif (CMAKE_BUILD_TYPE STREQUAL "Profile")
569+
message("C flags : ${CMAKE_C_FLAGS_PROFILE} ")
570+
message("CXX flags : ${CMAKE_CXX_FLAGS_PROFILE} ")
571+
else()
572+
message("C flags : ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}")
573+
message("CXX flags : ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}")
574+
endif()
575+
message("LINKER flags : ${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
576+
get_directory_property( COMPILER_DEFINITIONS DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS )
577+
message("Compiler defns : ${COMPILER_DEFINITIONS}")
578+
message("Binary directory: ${PROJECT_BINARY_DIR}")
579+
575580
##################################################################
576581
# the main executable
577582
##################################################################
578583

579-
add_executable(decentTree
584+
add_executable(decenttree
580585
decenttree.cpp
581586
flatmatrix.cpp flatmatrix.h
582587
starttree.cpp starttree.h
@@ -592,9 +597,9 @@ add_executable(decentTree
592597
operatingsystem.cpp operatingsystem.h safe_io.h)
593598

594599
if(ZLIB_FOUND)
595-
target_link_libraries(decentTree ${ZLIB_LIBRARIES})
600+
target_link_libraries(decenttree ${ZLIB_LIBRARIES})
596601
else(ZLIB_FOUND)
597-
target_link_libraries(decentTree zlibstatic)
602+
target_link_libraries(decenttree zlibstatic)
598603
endif(ZLIB_FOUND)
599604

600605
add_executable(hod_tree
@@ -611,15 +616,10 @@ endif(Backtrace_FOUND)
611616

612617
if (NOT DECENTTREE_FLAGS MATCHES "avx" AND NOT DECENTTREE_FLAGS MATCHES "fma")
613618
if (NOT DECENTTREE_FLAGS MATCHES "nosse")
614-
set_target_properties(decentTree vectorclass PROPERTIES COMPILE_FLAGS "${SSE_FLAGS}")
619+
set_target_properties(decenttree vectorclass PROPERTIES COMPILE_FLAGS "${SSE_FLAGS}")
615620
endif()
616621
endif()
617622

618-
add_compile_definitions(USE_PROGRESS_DISPLAY=1)
619-
add_compile_definitions(USE_VECTORCLASS_LIBRARY=1)
620-
add_compile_definitions(USE_GZSTREAM=1)
621-
622-
623623
##################################################################
624624
# setup linking flags
625625
##################################################################
@@ -647,9 +647,9 @@ if (NOT DECENTTREE_FLAGS MATCHES "single")
647647
endif()
648648
elseif(CLANG AND WIN32)
649649
if (BINARY32)
650-
target_link_libraries(decentTree ${PROJECT_SOURCE_DIR}/lib32/libiomp5md.dll)
650+
target_link_libraries(decenttree ${PROJECT_SOURCE_DIR}/lib32/libiomp5md.dll)
651651
else()
652-
target_link_libraries(decentTree ${PROJECT_SOURCE_DIR}/lib/libiomp5md.dll)
652+
target_link_libraries(decenttree ${PROJECT_SOURCE_DIR}/lib/libiomp5md.dll)
653653
endif()
654654
# set(THREAD_LIB "ompstatic")
655655
endif()
@@ -661,7 +661,7 @@ if (NOT DECENTTREE_FLAGS MATCHES "single")
661661
endif()
662662

663663
# basic linking librararies
664-
target_link_libraries(decentTree vectorclass
664+
target_link_libraries(decenttree vectorclass
665665
${PLATFORM_LIB} ${STD_LIB} ${THREAD_LIB} ${ATOMIC_LIB})
666666

667667
# MPI libraries
@@ -673,7 +673,7 @@ endif()
673673

674674
# setup the executable name
675675
##################################################################
676-
set_target_properties(decentTree PROPERTIES OUTPUT_NAME "decentTree${EXE_SUFFIX}")
676+
set_target_properties(decenttree PROPERTIES OUTPUT_NAME "decenttree${EXE_SUFFIX}")
677677

678678
# strip the release build
679679
if (NOT DECENTTREE_FLAGS MATCHES "no-strip" AND CMAKE_BUILD_TYPE STREQUAL "Release" AND (GCC OR CLANG) AND NOT APPLE) # strip is not necessary for MSVC
@@ -692,19 +692,19 @@ endif()
692692

693693
if (WIN32)
694694
if (MSVC)
695-
#ADD_CUSTOM_COMMAND(TARGET decentTree POST_BUILD COMMAND copy "${BINARY_DIR}/decentTree${EXE_SUFFIX}.exe" "${BINARY_DIR}/decentTree${EXE_SUFFIX}-click.exe")
695+
#ADD_CUSTOM_COMMAND(TARGET decenttree POST_BUILD COMMAND copy "${BINARY_DIR}/decenttree${EXE_SUFFIX}.exe" "${BINARY_DIR}/decentTree${EXE_SUFFIX}-click.exe")
696696
else()
697-
ADD_CUSTOM_COMMAND(TARGET decentTree POST_BUILD COMMAND copy "decentTree${EXE_SUFFIX}.exe" "decentTree${EXE_SUFFIX}-click.exe")
697+
ADD_CUSTOM_COMMAND(TARGET decenttree POST_BUILD COMMAND copy "decenttree${EXE_SUFFIX}.exe" "decentTree${EXE_SUFFIX}-click.exe")
698698
endif()
699699
endif()
700700

701701
##############################################################
702702
# add the install targets
703703
##############################################################
704-
install (TARGETS decentTree DESTINATION bin)
704+
install (TARGETS decenttree DESTINATION bin)
705705

706706
if (WIN32 OR WIN64)
707-
install (FILES "${BINARY_DIR}/decentTree${EXE_SUFFIX}-click.exe" DESTINATION bin)
707+
install (FILES "${BINARY_DIR}/decenttree${EXE_SUFFIX}-click.exe" DESTINATION bin)
708708
if (NOT DECENTTREE_FLAGS MATCHES "single" AND MSVC)
709709
if (BINARY32)
710710
install(FILES "${PROJECT_SOURCE_DIR}/lib32/pthreadVC2.dll" DESTINATION bin)

decenttree_update.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ cp heapsort.h gzstream.cpp gzstream.h progress.cpp progress.h safe_io.h ../../de
1818
cp operatingsystem.cpp operatingsystem.h timeutil.h my_assert.h ../../decenttree
1919
cd ..
2020
cp -R zlib-1.2.7 ../decenttree
21+
cp -R lib ../decenttree
22+
cp -R lib32 ../decenttree
2123
cp -R libmac ../decenttree
2224
cp -R vectorclass ../decenttree
2325
cp iqtree_config.h.in ../decenttree

lib/libiomp5md.dll

1.06 MB
Binary file not shown.

lib/libomp.a

975 KB
Binary file not shown.

lib/libompstatic.a

892 KB
Binary file not shown.

lib/pthreadGC2.dll

69.5 KB
Binary file not shown.

lib/pthreadGC2_64.dll

70.5 KB
Binary file not shown.

lib/pthreadVC2.dll

81 KB
Binary file not shown.

lib/pthreadVC2.lib

29 KB
Binary file not shown.

lib32/libiomp5md.dll

1020 KB
Binary file not shown.

lib32/libiomp5md.lib.dll

1020 KB
Binary file not shown.

lib32/libomp.a

734 KB
Binary file not shown.

lib32/pthreadVC2.dll

54.5 KB
Binary file not shown.

lib32/pthreadVC2.lib

29.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)