Skip to content

Commit

Permalink
Updated version strings and unit test config.
Browse files Browse the repository at this point in the history
The version strings in the CMake file and the
code have been updated. The POM has been extended
so that the java library path can be set properly
for the dependencies, depending on the OS and
architecture.
  • Loading branch information
gpu committed May 9, 2016
1 parent 0c134b5 commit b38ac3b
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ find_path(CLBLAST_INSTALL_DIR
# Set the variables that are later used to build the name of the native
# library, e.g. "JOCL-0_2_0-windows-x86_64.dll"

set(JOCL_BLAST_VERSION "0_0_1")
set(JOCL_BLAST_VERSION "0_7_0")

if(CMAKE_HOST_WIN32)
set(JOCL_HOST "windows")
Expand Down
98 changes: 96 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,99 @@
<url>[email protected]:gpu/JOCLBlast.git</url>
</scm>

<!--
Define properties that are required for naming and identifying the
native libraries, based on the operating system and architecture:
jocl.os : The short name for the operating system
jocl.arch : The architecture of the target platform
jocl.ext : The extension of the native libraries
jocl.prefix : The prefix of the native libraries
The native libraries will be named according to
LibraryName-${jocl.os}-${jocl.arch}.${jocl.ext}
e.g.
joclDriver-windows-x86_64.dll
-->

<profiles>
<profile>
<id>windows-x86_64</id>
<activation>
<os>
<family>windows</family>
<arch>amd64</arch>
</os>
</activation>
<properties>
<jocl.os>windows</jocl.os>
<jocl.arch>x86_64</jocl.arch>
<jocl.ext>dll</jocl.ext>
<jocl.prefix></jocl.prefix>
</properties>
</profile>
<profile>
<id>windows-x86</id>
<activation>
<os>
<family>windows</family>
<arch>x86</arch>
</os>
</activation>
<properties>
<jocl.os>windows</jocl.os>
<jocl.arch>x86</jocl.arch>
<jocl.ext>dll</jocl.ext>
<jocl.prefix></jocl.prefix>
</properties>
</profile>
<profile>
<id>linux-x86_64</id>
<activation>
<os>
<family>unix</family>
<arch>amd64</arch>
</os>
</activation>
<properties>
<jocl.os>linux</jocl.os>
<jocl.arch>x86_64</jocl.arch>
<jocl.ext>so</jocl.ext>
<jocl.prefix>lib</jocl.prefix>
</properties>
</profile>
<profile>
<id>linux-x86</id>
<activation>
<os>
<family>unix</family>
<arch>x86</arch>
</os>
</activation>
<properties>
<jocl.os>linux</jocl.os>
<jocl.arch>x86</jocl.arch>
<jocl.ext>so</jocl.ext>
<jocl.prefix>lib</jocl.prefix>
</properties>
</profile>
<profile>
<id>apple-x86_64</id>
<activation>
<os>
<family>mac</family>
<arch>x86_64</arch>
</os>
</activation>
<properties>
<jocl.os>apple</jocl.os>
<jocl.arch>x86_64</jocl.arch>
<jocl.ext>dylib</jocl.ext>
<jocl.prefix>lib</jocl.prefix>
</properties>
</profile>
</profiles>

<build>
<defaultGoal>package</defaultGoal>

Expand Down Expand Up @@ -134,13 +227,14 @@
<version>2.18.1</version>
<configuration>
<forkMode>once</forkMode>
<argLine>-Djava.library.path=${project.basedir}/nativeLibraries</argLine>
<argLine>-Djava.library.path=${project.basedir}/nativeLibraries${path.separator}${project.basedir}/nativeLibraries/${jocl.os}/${jocl.arch}/</argLine>
</configuration>
</plugin>

</plugins>
</build>


<dependencies>
<dependency>
<groupId>junit</groupId>
Expand All @@ -151,7 +245,7 @@
<dependency>
<groupId>org.jocl</groupId>
<artifactId>jocl</artifactId>
<version>0.2.0-RC01-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jocl/blast/CLBlast.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public class CLBlast
// Initialization of the native library
static
{
String libraryBaseName = "JOCLBlast_0_0_1";
String versionString = "0_7_0";
String libraryBaseName = "JOCLBlast_" + versionString;
String libraryName =
LibUtils.createPlatformLibraryName(libraryBaseName);
String dependentLibraryNames[] = { "clblast" };
Expand Down

0 comments on commit b38ac3b

Please sign in to comment.