Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
4b07025
#231 Defined private, public variable. Clean unuse code
minh1302 Aug 19, 2017
8c5b250
#231 Added test + Built Constructor, Getter + Setter of name, priorit…
minh1302 Aug 19, 2017
677eb3e
#231 Edited constructor. Added test + Built Init(), setName(), getNam…
minh1302 Aug 19, 2017
a8032c8
Merge branch 'development' into java.lang.Thread
Aug 28, 2017
0071038
#231 Implement Semaphore, Thread::join()
Aug 28, 2017
5bfec5b
#231 Fix test case
Aug 30, 2017
57fcc87
#231 Test std::thread
Aug 30, 2017
88d4bb7
#231 Remove semaphore
Aug 30, 2017
dde64dd
Resolve conflict
dquangit Sep 17, 2017
b56cf71
#231 Add new Semaphore
Sep 17, 2017
358a395
#231 Try decreasing sleep time
Sep 17, 2017
1f584a9
#231 Comment join testcase
Sep 17, 2017
c51c8d4
#231 Uncomment testcase, comment destructor
Sep 17, 2017
ad7f32a
#231 Comment testcase & destructor
Sep 17, 2017
134302a
#231 Comment testcase
Sep 17, 2017
44d93e4
#231 Try fixing crash
Sep 18, 2017
dc38f78
#231 Try fixing crash
Sep 18, 2017
60e84c1
#231 Add class field init
Sep 18, 2017
53f89ce
#231 Uncomment thread::join() testcase
Sep 18, 2017
087cf6f
Merge branch 'development' into java.lang.Thread
Sep 18, 2017
c5fb085
Merge branch 'development' into java.lang.Thread
loint Sep 19, 2017
3063d6b
#231 Add Thread::sleep()
Sep 25, 2017
7e2998b
#231 Implement Thread::getId(), Thread::currentThread(), InterruptedE…
Sep 26, 2017
536f0ec
#231 Add print long long to String:format(), remove Thread::sleep() t…
Sep 27, 2017
19d8ae4
#231 Debug getting thread id in appveyor env
Sep 27, 2017
eda2316
#231 Change method get thread id
Sep 27, 2017
eacd6d6
#231 Fix conflict
minh1302 Oct 10, 2017
10e2604
#231 Fix getting thread id
Oct 10, 2017
e6d5b2f
#231 Fix getting thread id
Oct 10, 2017
51a3b9e
#231 Fix getting thread id
Oct 10, 2017
4ca1d95
#231 Remove unused ostream
Oct 12, 2017
dfdefe2
#231 Fixed conflict
minh1302 Oct 14, 2017
be8932b
#231 Try installing clang++
Oct 15, 2017
3dd94e0
Try installing clang++
Oct 15, 2017
9a6db9f
Try installing clang++
Oct 15, 2017
a7cf885
Try installing clang++
Oct 15, 2017
715385a
Test brew
Oct 15, 2017
bf111d3
Test brew
Oct 15, 2017
a675a45
Test brew
Oct 15, 2017
c4c4596
#231 Try installing clang++
Oct 15, 2017
7e6926f
#231 Try installing clang++
Oct 15, 2017
55af676
#231 Try installing clang++
Oct 15, 2017
d627740
#231 Try installing clang++
Oct 15, 2017
c1bae3e
#231 Try installing clang++
Oct 15, 2017
3c993a6
Packaging library for specific operating system
loint Mar 19, 2018
94ad7cb
Packaging library for specific operating system
loint Mar 19, 2018
235ebab
Merge branch 'master' into development
loint Mar 19, 2018
4813f0e
Remove snap build - no need
loint Mar 19, 2018
0d1f908
Enable OpenMP for parallel processing
loint Mar 20, 2018
6637923
#231 Adding lambda constructor.
Mar 24, 2018
cee3245
#231 Fix travis config.
Mar 25, 2018
e52716b
#231 Remove unused files.
sonda2208 Mar 25, 2018
1cd6bc5
#231 Implement Thread::detach().
sonda2208 Mar 25, 2018
0e1da3c
Merge pull request #258 from foodtiny/java.lang.Thread
Mar 25, 2018
268f1a3
Ignore vscode files
loint Mar 25, 2018
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
15 changes: 7 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,26 @@
.DS_Store
bin
.idea
.vscode
.gradle
CMakeFiles
cmake-build-debug
cmake_install.cmake
cmake-*
cmake_*
CTestTestfile.cmake
install_manifest.txt
CMakeCache.txt
CPack*
_CPack*
DartConfiguration.tcl
Testing
/src
/Makefile
/release/Makefile
/native*
libnative*
/cygnative.dll
/native_benchmark
native_test.exe
build
libbenchmark.gcno
.gradle
gradle
gradlew
gradlew.bat
/remove_old_build.sh
gradle*
/unit_test.sh
37 changes: 30 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,20 @@ check_cxx_compiler_flag("-std=gnu++0x" COMPILER_SUPPORTS_CXX0X)

# Check CXX version
if (COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11 -Wfatal-errors")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11 -Wfatal-errors -Wno-multichar")
elseif (COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x -Wfatal-errors")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x -Wfatal-errors -Wno-multichar")
else ()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif ()

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wfatal-errors")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
# Support for OpenMP
find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()

# GNU Source compatible
add_definitions(-D_GNU_SOURCE)
Expand All @@ -68,9 +73,6 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
endif ()
endif ()

# Dynamic linked library for OSX
set(DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH})

# Release mode
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -march=native")

Expand Down Expand Up @@ -142,6 +144,26 @@ install(FILES library.hpp DESTINATION ../include/native)
install(DIRECTORY library DESTINATION ../include/native FILES_MATCHING PATTERN "*.hpp")
install(DIRECTORY kernel DESTINATION ../include/native FILES_MATCHING PATTERN "*.hpp")

# Detect operating system
find_file (DEBIAN debian_version debconf.conf PATHS /etc)
find_file (FEDORA fedora-release PATHS /etc)
find_file (REDHAT redhat-release inittab.RH PATHS /etc)

IF (${APPLE})
SET(CPACK_GENERATOR "DMG")
endif()
if (DEBIAN)
SET(CPACK_GENERATOR "DEB")
endif()
if (FEDORA OR REDHAT)
SET(CPACK_GENERATOR "RPM")
endif()
SET(CPACK_PACKAGE_CONTACT "loint.foodtiny@gmail.com")
SET(CPACK_PACKAGE_DESCRIPTION "Native Library for C++")
SET(CPACK_PACKAGE_VERSION "1.0.4")
SET(CPACK_PACKAGE_MAINTAINER "Loi Nguyen")
INCLUDE(CPack)

# Add uninstall
add_custom_target(
uninstall
Expand All @@ -152,6 +174,7 @@ add_custom_target(
# Link library for OSX and other platform
# Darwin platform no need to link realtime library (-lrt)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH})
target_link_libraries(${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT} -lm)
target_link_libraries(${PROJECT_NAME}_test ${CMAKE_THREAD_LIBS_INIT} -lm)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
Expand Down
2 changes: 0 additions & 2 deletions install

This file was deleted.

2 changes: 1 addition & 1 deletion library/Java/Lang/Runnable/Runnable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace Java {
namespace Lang {
class Runnable {
public:
virtual void run() const = 0;
virtual void run() = 0;
};
}
}
Expand Down
Loading